<%@ page import="java.util.List" %>
<%@ page import="cn.com.entity.Myarticle" %><%--
  Created by IntelliJ IDEA.
  User: DELL
  Date: 2020/10/23
  Time: 18:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  <%--导入指令--%>
<html>
<head>
    <title>动态管理</title>
    <style type="text/css">
        .allcont{
            width: 800px;
            margin: 0 auto;
            margin-top: 100px;
            border: 2px solid #0192e8;
            text-align: center;
        }
        table{
            width: 800px;
            margin: 0 auto;
        }
        th,td{
            width: 110px;
            height: 30px;
            text-align: center;
        }
        a{
            text-decoration: none;
            color: black;
        }
        a:hover{
            color: #0192e8;
        }
    </style>
</head>
<body>
     <div class="allcont">
         <%
             List<Myarticle> list =(List<Myarticle>)request.getAttribute("list");
         %>
         <table border="1">
             <tr>
                 <th>发布者</th>
                 <th>标题</th>
                 <th>内容</th>
                 <th>发布时间</th>
                 <th>操作</th>
             </tr>
             <%if(list.size() >0){%>
             <c:forEach items="${requestScope.list}" var="art">
                 <tr>
                     <td>${art.username}</td>
                     <td>${art.articleTitle}</td>
                     <td>${art.articleContent}</td>
                     <td>${art.articlePublishTime}</td>
                     <td><a href="/artdataDML?qqlx=delete&delid=${art.articleId}">删除</a></td>
                 </tr>
             </c:forEach>
             <%
             }else{
                 %>

             <%
             }%>

         </table>
     </div>
</body>
</html>
